<template>
    <div>

        <div class="demo-image">
            <div v-for="fit in fits" :key="fit" class="block" style=" width: 300px" @click="click11(fit.path)">
                <span class="demonstration">{{ fit.name }}</span>
                <el-image style="width: 200px; height: 200px;margin: 20px;" :src="fit.url" :fit="fit" />
            </div>
        </div>

    </div>
</template>
<script setup>
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const fits = [{
    name: 'fit',
    path: '/view2',
    url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
},
{
    name: 'fit1',
    path: '/view3',
    url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
}]

function click11(path) {
    router.push(path)
}
</script>




<style scoped>
.demo-image .block {
    padding: 30px 0;
    text-align: center;
    border-right: solid 1px var(--el-border-color);
    display: inline-block;
    width: 20%;
    box-sizing: border-box;
    vertical-align: top;
}

.demo-image .block:last-child {
    border-right: none;
}

.demo-image .demonstration {
    display: block;
    color: var(--el-text-color-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}
</style>
